package it.enricod.jcontextfree;

import it.enricod.jcontextfree.engine.IProgramLoader;
import it.enricod.jcontextfree.gui.IProgramsTabbedPane;
import it.enricod.jcontextfree.gui.IMainFrame;
import it.enricod.jcontextfree.gui.IProgramCodePanel;
import it.enricod.jcontextfree.gui.controllers.IMainController;
import it.enricod.jcontextfree.model.IProgramsLoader;
import it.enricod.jcontextfree.model.IProgramsRegistry;
import it.enricod.jcontextfree.model.impl.ProgramsRegistry;
import it.enricod.jcontextfree.model.impl.SamplesLoader;

import com.google.inject.AbstractModule;
import com.google.inject.Scopes;

import it.enricod.jcontextfree.engine.samples.IProgramsCatalog;

public class JContextFreeModule extends AbstractModule {

	@Override
	protected void configure() {
		bind(IProgramCodePanel.class);
		bind(IProgramsTabbedPane.class);
		bind(IMainFrame.class);
		bind(IProgramLoader.class);
		bind(IMainController.class);
		bind(IProgramsCatalog.class);

		// per ora leggiamo solo gli esempi
		bind(IProgramsLoader.class).to(SamplesLoader.class);
		bind(IProgramsRegistry.class).to(ProgramsRegistry.class).in(Scopes.SINGLETON);
	}
}
